﻿
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    
    <link rel="stylesheet" href="styles/style.css">
    <title>Company Search</title>
    
    
    <script src="scripts/rxjs_2.2.20/rx.lite.js"></script>

    <script src="scripts/angular/angular.min.js"></script>
    <script src="scripts/angular/angular-ui-bootstrap.min.js"></script>

    <script src="scripts/companysearch/service.js"></script>
    <script src="scripts/companysearch/controller.js"></script>
    <script src="scripts/companysearch/app.js"></script>


</head>

<body>
    <div ng-app="companySearchApp">
        <div ng-controller="CompanySeachController" ng-cloak class="ng-cloak">

            <div class="row">
                <div class="col-md-5">
                    <form class="form-inline" novalidate style="margin-bottom: 0;">
                        <div class="navbar-form navbar-search-box" role="search">
                            <input name="queryInput" ng-model="query" type="text" ng-change="onInputChanged()" class="form-control" placeholder="Search for Company">

                            <input name="queryInputES" ng-model="esquery" type="text" ng-change="onESInputChanged()" class="form-control" placeholder="Search for Company using ES">
                            <button ng-show="hasMore" ng-click="nextPage()"> Next Page</button>
                            <!--<button class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Search" ng-click="search()">Search</button>-->
                            <span ng-show="searching" class="loading-spinner"></span>
                            
                        </div>
                    </form>
                </div>


            </div>

            <div>
                <span style="color:red">{{errorMessage}}</span>
            </div>
         
            <!--<pre>
                {{position}}
            </pre>-->

            <div class="table-responsive">
                <table class="table table-bordered table-striped " id="prodtable">
                   
                    <tbody>
                        <tr ng-repeat="company in companies">
                            <td>
                                {{$index + 1}}
                            </td>
                            <td>
                                <span></span>
                            </td>
                            <td>
                                <strong> {{ company.name }} </strong>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>

        </div>
    </div>
  
</body>
</html>





